package com.dongdong.domain;

import com.dongdong.em.ResultEnum;

import java.io.Serializable;

public class Result implements Serializable {
    private Integer code;//返回状态码
    private String message;//返回状态信息
    private Object data;//
    private Object results;

    public Object getResults() {
        return results;


    }

    public Result setResults(Object results) {
        this.results = results;
        return this;
    }

    public static Result buildResult(ResultEnum e){
        Result result = new Result(e.getCode(), e.getMassage());
        return result;
    }

    public Result(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Result(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Result() {
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public  Result setData(Object data) {
        this.data = data;
        return this;
    }

}
